import axios from 'axios';
import {config} from  '../config'

//注册用户
export const Register = params => { return axios.post(config['baseurl']+`reg/`, params).then(res => res.data); };
//获取短信验证码
export const getcode = params => { return axios.get(config['baseurl']+`get_code/`,{ params:params }).then(res => res.data); };
//登录
export const Login = params => { return axios.get(config['baseurl']+`login/`, { params:params }).then(res => res.data); };
//发送邮件
export const sendmail = params => { return axios.post(config['baseurl']+`sendmail/`, params).then(res => res.data); };
//修改密码
export const changepwd = params => { return axios.get(config['baseurl']+`changepwd/`, { params:params }).then(res => res.data); };
//测试
export const test123 = params => { return axios.get(config['baseurl']+`test/`, { params:params }).then(res => res.data); };
//获取所有用户信息
export const getuser = params => { return axios.get(config['baseurl']+`userinfo/`, { params:params }).then(res => res.data); };
//修改用户权限_通过审核
export const modifyuser = params => { return axios.put(config['baseurl']+`userinfo/`, params).then(res => res.data); };
//修改用户权限_通过审核
export const shouquan = params => { return axios.post(config['baseurl']+`userinfo/`, params).then(res => res.data); };
//修改用户状态——归档
export const guidang = params => { return axios.delete(config['baseurl']+`userinfo/`, params).then(res => res.data); };
//获取货物信息
export const gethuowu = params => { return axios.get(config['baseurl']+`huowu/`, { params:params }).then(res => res.data); };
//添加货物信息
export const addhuowu = params => { return axios.post(config['baseurl']+`huowu/`, params).then(res => res.data); };
//获取标签需要信息
export const gettag = params => { return axios.get(config['baseurl']+`tag/`, { params:params }).then(res => res.data); };
//添加标签
export const addtag = params => { return axios.post(config['baseurl']+`tag/`,params).then(res => res.data); };
//添加客户
export const addcustomer = params => { return axios.post(config['baseurl']+`customer/`,params).then(res => res.data); };
//添加客户
export const getcustomer = params => { return axios.get(config['baseurl']+`customer/`,{ params:params }).then(res => res.data); };
//更新客户信息
export const updatecustomer = params => { return axios.update(config['baseurl']+`customer/`,{ params:params }).then(res => res.data); };
//获取订单号
export const getorder_id = params => { return axios.get(config['baseurl']+`order/`,{ params:params }).then(res => res.data); };
//发货订单
export const addorder = params => { return axios.post(config['baseurl']+`order/`,params).then(res => res.data); };
//更新运单信息
export const updateorder = params => { return axios.put(config['baseurl']+`order/`,params).then(res => res.data); };

//获取订单号
export const gettotal = params => { return axios.get(config['baseurl']+`ordertotal/`,{ params:params }).then(res => res.data); };

//获取城市
export const getcity = params => { return axios.get(config['baseurl']+`getcity/`,{ params:params }).then(res => res.data); };
//获取城市
export const getwuliu = params => { return axios.get(config['baseurl']+`wuliu/`,{ params:params }).then(res => res.data); };